import {
  Alert,
  Avatar,
  AutoComplete,
  Badge,
  Button,
  Card,
  Checkbox,
  ConfigProvider,
  Collapse,
  Col,
  DatePicker,
  Descriptions,
  Divider,
  Drawer,
  Dropdown,
  Form,
  Input,
  InputGroup,
  InputNumber,
  List,
  Layout,
  Menu,
  Mentions,
  Modal,
  Pagination,
  PageHeader,
  Popover,
  Popconfirm,
  Progress,
  Radio,
  Row,
  Select,
  Slider,
  Switch,
  Space,
  Spin,
  Table,
  Tabs,
  Tag,
  Tooltip,
  Tree,
  TreeSelect,
  Transfer,
  Upload,
  Typography,
  Carousel
} from 'ant-design-vue'

const antd = {
  install(Vue) {
    // antd
    Vue.use(Alert)
    Vue.use(AutoComplete)
    Vue.use(Avatar)
    Vue.use(Badge)
    Vue.use(Button)
    Vue.use(Card)
    Vue.use(Checkbox)
    Vue.use(ConfigProvider)
    Vue.use(Col)
    Vue.use(Collapse)
    Vue.use(DatePicker)
    Vue.use(Descriptions)

    Vue.component(Drawer.name, { ...Drawer, props: { ...Drawer.props, width: { default: 700 }, footerStyle: { default: { textAlign: 'right' } } } })

    Vue.use(Divider)
    Vue.use(Dropdown)
    Vue.use(Form)
    Vue.component(Input.name, { ...Input, props: { ...Input.props, allowClear: { default: true } } })
    Vue.component(Input.Group.name, { ...Input.Group, props: { ...Input.Group.props, allowClear: { default: true } } })
    Vue.component(Input.TextArea.name, { ...Input.TextArea, props: { ...Input.TextArea.props, allowClear: { default: true } } })
    Vue.component(Input.Password.name, { ...Input.Password, props: { ...Input.Password.props, allowClear: { default: true } } })
    Vue.component(Input.Search.name, { ...Input.Search, props: { ...Input.Search.props } })

    Vue.use(InputGroup)
    Vue.use(Input.Group)
    Vue.use(InputNumber)
    Vue.use(List)
    Vue.use(Layout)
    Vue.use(Menu)
    Vue.use(Modal)
    Vue.use(Mentions)
    Vue.use(PageHeader)
    Vue.use(Pagination)
    Vue.use(Popover)
    Vue.use(Popconfirm)
    Vue.use(Progress)
    Vue.use(Radio)
    Vue.use(Row)
    Vue.use(Select)
    Vue.use(Slider)
    Vue.use(Switch)
    Vue.use(Space)
    Vue.use(Spin)
    Vue.use(Table)
    Vue.use(Tabs)
    Vue.use(Tag)
    Vue.use(Tooltip)
    Vue.use(Tree)
    Vue.use(TreeSelect)
    Vue.use(Transfer)
    Vue.use(Upload)
    Vue.use(Typography)
    Vue.use(Carousel)
  }
}

export default antd
